<?php
include_once("init.php");

?>
<!DOCTYPE html>

<html lang="en">
<head>
	<meta charset="utf-8">
	<title>WPOS - Report</title>
	
	<!-- Stylesheets -->
	<link href='http://fonts.googleapis.com/css?family=Droid+Sans:400,700' rel='stylesheet'>
	<link rel="stylesheet" href="css/style.css">
         <link rel="stylesheet" href="js/date_pic/date_input.css">
	
	<!-- Optimize for mobile devices -->
	<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
	
	<!-- jQuery & JS files -->
	<?php include_once("tpl/common_js.php"); ?>
         <script src="js/date_pic/jquery.date_input.js"></script>  
	<script src="js/script.js"></script>  
		

</head>
<body>

	<!-- TOP BAR -->
	<?php include_once("tpl/top_bar.php"); ?>
	<!-- end top-bar -->
	
	
	
	<!-- HEADER -->
	<div id="header-with-tabs">
		
		<div class="page-full-width cf">
	
			<ul id="tabs" class="fl">
                                <li><a href="dashboard.php" class="dashboard-tab">Dashboard</a></li>
				<li><a href="view_sales.php" class="sales-tab">Sales</a></li>
				<li><a href="view_customers.php" class=" customers-tab">Customers</a></li>
				<li><a href="view_purchase.php" class="purchase-tab">Purchase</a></li>
				<li><a href="view_supplier.php" class=" supplier-tab">Supplier</a></li>
				<li><a href="view_product.php" class="stock-tab">Stocks / Products</a></li>
				<li><a href="view_payments.php" class=" payment-tab">Payments / Outstandings</a></li>
				<li><a href="view_report.php" class="active-tab report-tab">Reports</a></li>
			</ul> <!-- end tabs -->
			
			<!-- Change this image to your own company's logo -->
			<!-- The logo will automatically be resized to 30px height. -->
			<a href="#" id="company-branding-small" class="fr"><img src="<?php if(isset($_SESSION['logo'])) { echo "upload/".$_SESSION['logo'];}else{ echo "upload/POSNIC.png"; } ?>" alt="Point of Sale" /></a>
			
		</div> <!-- end full-width -->	

	</div> <!-- end header -->
	
	
	
	<!-- MAIN CONTENT -->
	<div id="content">
		
		<div class="page-full-width cf">

			<div class="side-menu fl">
				
				<h3>Report</h3>
				<ul>
                                	<ul>
                                            <li><a href="sel_item_for_barcode.php">Barcode Report</a></li>
					                                      
				                     </ul>
                     </ul>
                 <?php include_once("google_ads.php"); ?>
                  
			</div> <!-- end side-menu -->
			<?php
                   $sql="select sd.id barcode, sd.stock_name, sd.selling_price, sa.quantity from stock_details sd, stock_avail sa
                         where sd.id=sa.id and sa.quantity>0";
                   $result = mysql_query($sql);                                               
                   ?>
			<div class="side-content fr">
			
				<div class="content-module">
				
					<div class="content-module-heading cf">
					
						<h3 class="fl">Report</h3>
						<span class="fr expand-collapse-text">Click to collapse</span>
						<span class="fr expand-collapse-text initial-expand">Click to expand</span>
					
					</div> <!-- end content-module-heading -->
					
						<div class="content-module-main cf">
                <form action="item_barcode_report_print.php" method="post" name="item_barcode"  id="item_barcode" >
                  <table  width="300" border="0" cellspacing="0" cellpadding="0">
                    <tr>
					   <td><strong>Barcode</strong></td>
					   <td><strong>Item Name</strong></td>
					   <td><strong>Selling Price</strong></td>
					   <td><strong>No. of Product Barcode for Print</strong></td>					      
		            </tr>
		            <?php
		             while($row = mysql_fetch_array($result))
		                { ?>
		                <tr>
		  
					      <td><?php echo $row['barcode']; ?> <input type="hidden" name="barcodeid[]" value="<?php echo $row['barcode']; ?>"></td>
					      <td><?php echo $row['stock_name']; ?><input type="hidden" name="stock_name[]" value="<?php echo $row['stock_name']; ?>"></td>
					      <td><?php echo $row['selling_price']; ?><input type="hidden" name="selling_price[]" value="<?php echo $row['selling_price']; ?>"></td>
					      <td><input name="quantity[]" type="text" id="quantity" value="<?php echo $row['quantity']; ?>" style="width:80px;"></td>					      
		               </tr>
		               <?php } ?>

                  </table>
                  <input type="submit" value="Print Product & Barcode">
                </form>
						
				
					</div> <!-- end content-module-main -->
							
				
				</div> <!-- end content-module -->
				
				
		
		</div> <!-- end full-width -->
			
	</div> <!-- end content -->
	
	
	
	<!-- FOOTER -->
	<div id="footer">
		<p>Any Queries email to <a href="mailto:joysana@gmail.com?subject=Stock%20Management%20System">joysana@gmail.com</a>.</p>
	
	</div> <!-- end footer -->

</body>
</html>